<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>08.原型理论</title>
</head>

<body>

    <script>
        function Student() {
            this.say = function () {
                console.log("我是对象内部的方法。。。");
            }
        }

        Student.prototype.say = function () {
            console.log("我是原型对象内部的方法。。。");
        }

        Object.prototype.say = function () {
            console.log("我是Object对象内部的方法。。。");
        }

        // 获取原型
        console.log(Student.prototype);
        var stu = new Student()

        stu.say()
        console.dir(stu.__proto__);
        console.log(stu.__proto__ === Student.prototype);
        console.log(Student.prototype.constructor);

        console.log(Student.prototype.__proto__);
        console.log(Student.prototype.__proto__.__proto__);
    </script>

</body>

</html>